﻿<UserControl x:Class="SLExtensions.Showcase.PageFixedComboBox"
    xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation" 
    xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
    xmlns:ctl="clr-namespace:SLExtensions.Showcase.Controllers"
    xmlns:sle="clr-namespace:SLExtensions.Input;assembly=SLExtensions"
    xmlns:controls="clr-namespace:SLExtensions.Controls;assembly=SLExtensions.Controls">
    <UserControl.DataContext>
        <ctl:PageFixedComboBoxController />
    </UserControl.DataContext>
    <Grid>
        <Grid.ColumnDefinitions>
            <ColumnDefinition Width="0.5*" />
            <ColumnDefinition Width="0.5*" />
        </Grid.ColumnDefinitions>
        <Grid.RowDefinitions>
            <RowDefinition Height="Auto" />
            <RowDefinition Height="0.5*" />
            <RowDefinition Height="0.5*" />
        </Grid.RowDefinitions>

        <StackPanel Orientation="Horizontal" Grid.ColumnSpan="2">

            <Button Content="Add item to combos" sle:CommandService.Command="{Binding AddItem}" Margin="2"/>

            <TextBlock Margin="2" VerticalAlignment="Center" Text="Note : Left combo is built-in one, Right is fixed one" />
        </StackPanel>

        <ComboBox Grid.Row="1" VerticalAlignment="Top" ItemsSource="{Binding ItemsSource}" HorizontalAlignment="Center" />
        <controls:FixedComboBox Grid.Row="1" Grid.Column="1" VerticalAlignment="Top" ItemsSource="{Binding ItemsSource}" HorizontalAlignment="Center" />

        <ComboBox Grid.Row="2" VerticalAlignment="Top" ItemsSource="{Binding ItemsSource}" HorizontalAlignment="Center" >
            <ComboBox.RenderTransform>
                <ScaleTransform ScaleX="3" ScaleY="3" />
            </ComboBox.RenderTransform>
        </ComboBox>
        <controls:FixedComboBox Grid.Row="2" Grid.Column="1" VerticalAlignment="Top" ItemsSource="{Binding ItemsSource}" HorizontalAlignment="Center" >
            <controls:FixedComboBox.RenderTransform>
                <ScaleTransform ScaleX="3" ScaleY="3" />
            </controls:FixedComboBox.RenderTransform>
        </controls:FixedComboBox>
    </Grid>
</UserControl>
